// string_view standard header
// Copyright (c) Microsoft Corporation. All rights reserved.
#pragma once
#ifndef _STRING_VIEW_
#define _STRING_VIEW_
#ifndef RC_INVOKED
#include <xstring>
#include <xstring_insert.h>

#if !_HAS_CXX17
 #error string_view is only available with C++17.
#endif /* _HAS_CXX17 */

#pragma pack(push,_CRT_PACKING)
#pragma warning(push,_STL_WARNING_LEVEL)
#pragma warning(disable: _STL_DISABLED_WARNINGS)
#pragma push_macro("new")
#undef new

_STD_BEGIN
template<class _Elem,
	class _Traits> inline
	basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr,
		const basic_string_view<_Elem, _Traits> _Str)
	{	// insert _Str into _Ostr
	return (_Insert_string(_Ostr, _Str.data(), _Str.size()));
	}
_STD_END

#pragma pop_macro("new")
#pragma warning(pop)
#pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _STRING_VIEW_ */
